//
//  RegisterResponse.swift
//  swiftBase
//
//  Created by 郭艳波 on 2018/3/7.
//  Copyright © 2018年 郭艳波. All rights reserved.
//

import UIKit
import ObjectMapper

class RegisterResponse: NSObject, Mappable {
    var code: Int!
    var data: RegisterDataResponse!
    
    required init?(map: Map) {
        if map.JSON["code"] == nil { return nil }
        if map.JSON["data"] == nil { return nil }
    }
    
    func mapping(map: Map) {
        code   <- map["code"]
        data   <- map["data"]
    }
}

class RegisterDataResponse: NSObject, Mappable {
    var user: User!
    
    required init?(map: Map) {
        if map.JSON["user"] == nil { return nil }
    }
    
    func mapping(map: Map) {
        user    <- map["user"]
    }
}
